package com.ej.busi.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.ej.common.annotation.Excel;
import com.ej.common.annotation.Excel.ColumnType;
import com.ej.common.core.domain.BaseEntity;
import com.ej.common.core.domain.entity.SysDept;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

/**
 * 科目表 ej_subject
 * 
 * @author ej
 */
@Data
public class EjSubject implements Serializable {
    private static final long serialVersionUID = 1L;

    /** 参数主键 */
//    @Excel(name = "参数主键", cellType = ColumnType.NUMERIC)
    private Long id;

    /** 名称 */
    @Excel(name = "名称")
    private String name;


    /** 名称 */
    @Excel(name = "上级科目id")
    private String parentId;

    @Excel(name = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Excel(name = "更新时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    /** 子部门 */
    @TableField(exist = false)
    private List<EjSubject> children = new ArrayList<EjSubject>();
}
